package com.stlm2.dems.user.entity.base;

import com.stlm2.dems.user.entity.IsInit;
import com.stlm2.dems.user.entity.IsValid;

import java.io.Serializable;

/**
 * Created by ZLQ on 2017/7/11.
 */
public class BaseRole implements Serializable{
    //主键ID
    private int id;
    //显示名称
    private String name;
    //标签
    private String label;
    //是否有效，有效（1），无效（0）
    private IsValid isValid;
    //是否可初始化，1，可以，2不可以
    private IsInit isInit;

    public IsInit getIsInit() {
        return isInit;
    }

    public void setIsInit(IsInit isInit) {
        this.isInit = isInit;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public IsValid getIsValid() {
        return isValid;
    }

    public void setIsValid(IsValid isValid) {
        this.isValid = isValid;
    }
    public Integer getIsValidValue() {
        return (isValid != null) ? isValid.getIntValue() : null;
    }

    public void setIsValidValue(Integer value) {
        if (value != null)
            this.isValid = IsValid.getByIntValue(value);
    }

    public Integer getIsInitValue() {
        return (isInit != null) ? isInit.getIntValue() : null;
    }

    public void setIsInitValue(Integer value) {
        if (value != null)
            this.isInit = IsInit.getByIntValue(value);
    }
}
